project(FreeImage)

set(FreeImage_SOURCES
	Source/CacheFile.h
	Source/DeprecationManager/Deprecated.cpp
	Source/DeprecationManager/DeprecationMgr.cpp
	Source/DeprecationManager/DeprecationMgr.h
	Source/FreeImage.h
	Source/FreeImage/BitmapAccess.cpp
	Source/FreeImage/CacheFile.cpp
	Source/FreeImage/ColorLookup.cpp
	Source/FreeImage/Conversion.cpp
	Source/FreeImage/Conversion16_555.cpp
	Source/FreeImage/Conversion16_565.cpp
	Source/FreeImage/Conversion24.cpp
	Source/FreeImage/Conversion32.cpp
    Source/FreeImage/ConversionFloat.cpp
    Source/FreeImage/ConversionRGB16.cpp
	Source/FreeImage/Conversion4.cpp
	Source/FreeImage/Conversion8.cpp
	Source/FreeImage/ConversionRGBF.cpp
	Source/FreeImage/ConversionType.cpp
    Source/FreeImage/ConversionUINT16.cpp
	Source/FreeImage/FreeImage.cpp
	Source/FreeImage/FreeImageIO.cpp
	Source/FreeImage/GetType.cpp
	Source/FreeImage/Halftoning.cpp
	Source/FreeImage/J2KHelper.cpp
	Source/FreeImage/MemoryIO.cpp
    Source/FreeImage/MNGHelper.cpp
	Source/FreeImage/MultiPage.cpp
	Source/FreeImage/NNQuantizer.cpp
	Source/FreeImage/PSDParser.cpp
	Source/FreeImage/PSDParser.h
	Source/FreeImage/PixelAccess.cpp
	Source/FreeImage/Plugin.cpp
	Source/FreeImage/PluginBMP.cpp
	Source/FreeImage/PluginCUT.cpp
	Source/FreeImage/PluginDDS.cpp
	Source/FreeImage/PluginEXR.cpp
	Source/FreeImage/PluginG3.cpp
	Source/FreeImage/PluginGIF.cpp
	Source/FreeImage/PluginHDR.cpp
	Source/FreeImage/PluginICO.cpp
	Source/FreeImage/PluginIFF.cpp
	Source/FreeImage/PluginJ2K.cpp
    Source/FreeImage/PluginJNG.cpp
	Source/FreeImage/PluginJP2.cpp
	Source/FreeImage/PluginJPEG.cpp
	Source/FreeImage/PluginKOALA.cpp
	Source/FreeImage/PluginMNG.cpp
	Source/FreeImage/PluginPCD.cpp
	Source/FreeImage/PluginPCX.cpp
	Source/FreeImage/PluginPFM.cpp
	Source/FreeImage/PluginPICT.cpp
	Source/FreeImage/PluginPNG.cpp
	Source/FreeImage/PluginPNM.cpp
	Source/FreeImage/PluginPSD.cpp
	Source/FreeImage/PluginRAS.cpp
	Source/FreeImage/PluginRAW.cpp
	Source/FreeImage/PluginSGI.cpp
	Source/FreeImage/PluginTARGA.cpp
	Source/FreeImage/PluginTIFF.cpp
	Source/FreeImage/PluginWBMP.cpp
	Source/FreeImage/PluginXBM.cpp
	Source/FreeImage/PluginXPM.cpp
	Source/FreeImage/TIFFLogLuv.cpp
	Source/FreeImage/ToneMapping.cpp
	Source/FreeImage/WuQuantizer.cpp
	Source/FreeImage/ZLibInterface.cpp
	Source/FreeImage/tmoColorConvert.cpp
	Source/FreeImage/tmoDrago03.cpp
	Source/FreeImage/tmoFattal02.cpp
	Source/FreeImage/tmoReinhard05.cpp
	Source/FreeImageIO.h
	Source/FreeImageToolkit/BSplineRotate.cpp
	Source/FreeImageToolkit/Background.cpp
	Source/FreeImageToolkit/Channels.cpp
	Source/FreeImageToolkit/ClassicRotate.cpp
	Source/FreeImageToolkit/Colors.cpp
	Source/FreeImageToolkit/CopyPaste.cpp
	Source/FreeImageToolkit/Display.cpp
	Source/FreeImageToolkit/Filters.h
	Source/FreeImageToolkit/Flip.cpp
	Source/FreeImageToolkit/JPEGTransform.cpp
	Source/FreeImageToolkit/MultigridPoissonSolver.cpp
	Source/FreeImageToolkit/Rescale.cpp
	Source/FreeImageToolkit/Resize.cpp
	Source/FreeImageToolkit/Resize.h
	Source/LibJPEG/jaricom.c
	Source/LibJPEG/jcapimin.c
	Source/LibJPEG/jcapistd.c
	Source/LibJPEG/jcarith.c
	Source/LibJPEG/jccoefct.c
	Source/LibJPEG/jccolor.c
	Source/LibJPEG/jcdctmgr.c
	Source/LibJPEG/jchuff.c
	Source/LibJPEG/jcinit.c
	Source/LibJPEG/jcmainct.c
	Source/LibJPEG/jcmarker.c
	Source/LibJPEG/jcmaster.c
	Source/LibJPEG/jcomapi.c
	Source/LibJPEG/jconfig.h
	Source/LibJPEG/jcparam.c
	Source/LibJPEG/jcprepct.c
	Source/LibJPEG/jcsample.c
	Source/LibJPEG/jctrans.c
	Source/LibJPEG/jdapimin.c
	Source/LibJPEG/jdapistd.c
	Source/LibJPEG/jdarith.c
	Source/LibJPEG/jdatadst.c
	Source/LibJPEG/jdatasrc.c
	Source/LibJPEG/jdcoefct.c
	Source/LibJPEG/jdcolor.c
	Source/LibJPEG/jdct.h
	Source/LibJPEG/jddctmgr.c
	Source/LibJPEG/jdhuff.c
	Source/LibJPEG/jdinput.c
	Source/LibJPEG/jdmainct.c
	Source/LibJPEG/jdmarker.c
	Source/LibJPEG/jdmaster.c
	Source/LibJPEG/jdmerge.c
	Source/LibJPEG/jdpostct.c
	Source/LibJPEG/jdsample.c
	Source/LibJPEG/jdtrans.c
	Source/LibJPEG/jerror.c
	Source/LibJPEG/jerror.h
	Source/LibJPEG/jfdctflt.c
	Source/LibJPEG/jfdctfst.c
	Source/LibJPEG/jfdctint.c
	Source/LibJPEG/jidctflt.c
	Source/LibJPEG/jidctfst.c
	Source/LibJPEG/jidctint.c
	Source/LibJPEG/jinclude.h
	Source/LibJPEG/jmemmgr.c
	Source/LibJPEG/jmemnobs.c
	Source/LibJPEG/jmemsys.h
	Source/LibJPEG/jmorecfg.h
	Source/LibJPEG/jpegint.h
	Source/LibJPEG/jpeglib.h
	Source/LibJPEG/jquant1.c
	Source/LibJPEG/jquant2.c
	Source/LibJPEG/jutils.c
	Source/LibJPEG/jversion.h
	Source/LibJPEG/transupp.c
	Source/LibJPEG/transupp.h
	Source/LibOpenJPEG/bio.c
	Source/LibOpenJPEG/bio.h
    Source/LibOpenJPEG/cidx_manager.c
    Source/LibOpenJPEG/cidx_manager.h
	Source/LibOpenJPEG/cio.c
	Source/LibOpenJPEG/cio.h
	Source/LibOpenJPEG/dwt.c
	Source/LibOpenJPEG/dwt.h
	Source/LibOpenJPEG/event.c
	Source/LibOpenJPEG/event.h
	Source/LibOpenJPEG/fix.h
	Source/LibOpenJPEG/image.c
	Source/LibOpenJPEG/image.h
    Source/LibOpenJPEG/indexbox_manager.h
	Source/LibOpenJPEG/int.h
	Source/LibOpenJPEG/j2k.c
	Source/LibOpenJPEG/j2k.h
	Source/LibOpenJPEG/j2k_lib.c
	Source/LibOpenJPEG/j2k_lib.h
	Source/LibOpenJPEG/jp2.c
	Source/LibOpenJPEG/jp2.h
	Source/LibOpenJPEG/jpt.c
	Source/LibOpenJPEG/jpt.h
	Source/LibOpenJPEG/mct.c
	Source/LibOpenJPEG/mct.h
	Source/LibOpenJPEG/mqc.c
	Source/LibOpenJPEG/mqc.h
	Source/LibOpenJPEG/openjpeg.c
	Source/LibOpenJPEG/openjpeg.h
    Source/LibOpenJPEG/opj_config.h
	Source/LibOpenJPEG/opj_includes.h
	Source/LibOpenJPEG/opj_malloc.h
    Source/LibOpenJPEG/phix_manager.c
	Source/LibOpenJPEG/pi.c
	Source/LibOpenJPEG/pi.h
    Source/LibOpenJPEG/ppix_manager.c
	Source/LibOpenJPEG/raw.c
	Source/LibOpenJPEG/raw.h
	Source/LibOpenJPEG/t1.c
	Source/LibOpenJPEG/t1.h
	Source/LibOpenJPEG/t1_luts.h
	Source/LibOpenJPEG/t2.c
	Source/LibOpenJPEG/t2.h
	Source/LibOpenJPEG/tcd.c
	Source/LibOpenJPEG/tcd.h
	Source/LibOpenJPEG/tgt.c
	Source/LibOpenJPEG/tgt.h
    Source/LibOpenJPEG/thix_manager.c
    Source/LibOpenJPEG/tpix_manager.c
	Source/LibPNG/png.c
	Source/LibPNG/png.h
	Source/LibPNG/pngconf.h
    Source/LibPNG/pngdebug.h
	Source/LibPNG/pngerror.c
	Source/LibPNG/pnggccrd.c
	Source/LibPNG/pngget.c
    Source/LibPNG/pnginfo.h
    Source/LibPNG/pnglibconf.h
	Source/LibPNG/pngmem.c
	Source/LibPNG/pngpread.c
	Source/LibPNG/pngread.c
    Source/LibPNG/pngpriv.h
	Source/LibPNG/pngrio.c
	Source/LibPNG/pngrtran.c
	Source/LibPNG/pngrutil.c
	Source/LibPNG/pngset.c
    Source/LibPNG/pngstruct.h
	Source/LibPNG/pngtrans.c
	Source/LibPNG/pngvcrd.c
	Source/LibPNG/pngwio.c
	Source/LibPNG/pngwrite.c
	Source/LibPNG/pngwtran.c
	Source/LibPNG/pngwutil.c
	Source/LibRawLite/internal/dcraw_common.cpp
	Source/LibRawLite/internal/dcraw_fileio.cpp
	Source/LibRawLite/internal/defines.h
    Source/LibRawLite/internal/demosaic_packs.cpp
    Source/LibRawLite/internal/libraw_bytebuffer.h
	Source/LibRawLite/internal/libraw_internal_funcs.h
	Source/LibRawLite/internal/var_defines.h
	Source/LibRawLite/libraw/libraw.h
	Source/LibRawLite/libraw/libraw_alloc.h
	Source/LibRawLite/libraw/libraw_const.h
	Source/LibRawLite/libraw/libraw_datastream.h
	Source/LibRawLite/libraw/libraw_internal.h
	Source/LibRawLite/libraw/libraw_types.h
	Source/LibRawLite/libraw/libraw_version.h
	Source/LibRawLite/src/libraw_c_api.cpp
	Source/LibRawLite/src/libraw_cxx.cpp
    Source/LibRawLite/src/libraw_datastream.cpp
	Source/LibTIFF4/t4.h
	Source/LibTIFF4/tif_aux.c
	Source/LibTIFF4/tif_close.c
	Source/LibTIFF4/tif_codec.c
	Source/LibTIFF4/tif_color.c
	Source/LibTIFF4/tif_compress.c
	Source/LibTIFF4/tif_config.h
	Source/LibTIFF4/tif_dir.c
	Source/LibTIFF4/tif_dir.h
	Source/LibTIFF4/tif_dirinfo.c
	Source/LibTIFF4/tif_dirread.c
	Source/LibTIFF4/tif_dirwrite.c
	Source/LibTIFF4/tif_dumpmode.c
	Source/LibTIFF4/tif_error.c
	Source/LibTIFF4/tif_extension.c
	Source/LibTIFF4/tif_fax3.c
	Source/LibTIFF4/tif_fax3.h
	Source/LibTIFF4/tif_fax3sm.c
	Source/LibTIFF4/tif_flush.c
	Source/LibTIFF4/tif_getimage.c
	Source/LibTIFF4/tif_jpeg.c
    Source/LibTIFF4/tif_jpeg_12.c
	Source/LibTIFF4/tif_luv.c
    Source/LibTIFF4/tif_lzma.c
	Source/LibTIFF4/tif_lzw.c
	Source/LibTIFF4/tif_next.c
	Source/LibTIFF4/tif_ojpeg.c
	Source/LibTIFF4/tif_open.c
	Source/LibTIFF4/tif_packbits.c
	Source/LibTIFF4/tif_pixarlog.c
	Source/LibTIFF4/tif_predict.c
	Source/LibTIFF4/tif_predict.h
	Source/LibTIFF4/tif_print.c
	Source/LibTIFF4/tif_read.c
	Source/LibTIFF4/tif_strip.c
	Source/LibTIFF4/tif_swab.c
	Source/LibTIFF4/tif_thunder.c
	Source/LibTIFF4/tif_tile.c
	Source/LibTIFF4/tif_version.c
	Source/LibTIFF4/tif_warning.c
	Source/LibTIFF4/tif_write.c
	Source/LibTIFF4/tif_zip.c
	Source/LibTIFF4/tiff.h
	Source/LibTIFF4/tiffio.h
	Source/LibTIFF4/tiffiop.h
	Source/LibTIFF4/tiffvers.h
	Source/LibTIFF4/uvcode.h
	Source/Metadata/Exif.cpp
	Source/Metadata/FIRational.cpp
	Source/Metadata/FIRational.h
	Source/Metadata/FreeImageTag.cpp
	Source/Metadata/FreeImageTag.h
	Source/Metadata/IPTC.cpp
	Source/Metadata/TagConversion.cpp
	Source/Metadata/TagLib.cpp
	Source/Metadata/XTIFF.cpp
	Source/OpenEXR/Half/eLut.h
	Source/OpenEXR/Half/half.cpp
	Source/OpenEXR/Half/half.h
	Source/OpenEXR/Half/halfFunction.h
	Source/OpenEXR/Half/halfLimits.h
	Source/OpenEXR/Half/toFloat.h
	Source/OpenEXR/Iex/Iex.h
	Source/OpenEXR/Iex/IexBaseExc.cpp
	Source/OpenEXR/Iex/IexBaseExc.h
	Source/OpenEXR/Iex/IexErrnoExc.h
	Source/OpenEXR/Iex/IexMacros.h
	Source/OpenEXR/Iex/IexMathExc.h
	Source/OpenEXR/Iex/IexThrowErrnoExc.cpp
	Source/OpenEXR/Iex/IexThrowErrnoExc.h
	Source/OpenEXR/IlmBaseConfig.h
    Source/OpenEXR/IlmImf/b44ExpLogTable.h
    Source/OpenEXR/IlmImf/ImfAcesFile.cpp
    Source/OpenEXR/IlmImf/ImfAcesFile.h
	Source/OpenEXR/IlmImf/ImfArray.h
	Source/OpenEXR/IlmImf/ImfAttribute.cpp
	Source/OpenEXR/IlmImf/ImfAttribute.h
	Source/OpenEXR/IlmImf/ImfAutoArray.h
	Source/OpenEXR/IlmImf/ImfB44Compressor.cpp
	Source/OpenEXR/IlmImf/ImfB44Compressor.h
	Source/OpenEXR/IlmImf/ImfBoxAttribute.cpp
	Source/OpenEXR/IlmImf/ImfBoxAttribute.h
	Source/OpenEXR/IlmImf/ImfCRgbaFile.cpp
	Source/OpenEXR/IlmImf/ImfCRgbaFile.h
	Source/OpenEXR/IlmImf/ImfChannelList.cpp
	Source/OpenEXR/IlmImf/ImfChannelList.h
	Source/OpenEXR/IlmImf/ImfChannelListAttribute.cpp
	Source/OpenEXR/IlmImf/ImfChannelListAttribute.h
	Source/OpenEXR/IlmImf/ImfChromaticities.cpp
	Source/OpenEXR/IlmImf/ImfChromaticities.h
	Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.cpp
	Source/OpenEXR/IlmImf/ImfChromaticitiesAttribute.h
	Source/OpenEXR/IlmImf/ImfCompression.h
	Source/OpenEXR/IlmImf/ImfCompressionAttribute.cpp
	Source/OpenEXR/IlmImf/ImfCompressionAttribute.h
	Source/OpenEXR/IlmImf/ImfCompressor.cpp
	Source/OpenEXR/IlmImf/ImfCompressor.h
	Source/OpenEXR/IlmImf/ImfConvert.cpp
	Source/OpenEXR/IlmImf/ImfConvert.h
	Source/OpenEXR/IlmImf/ImfDoubleAttribute.cpp
	Source/OpenEXR/IlmImf/ImfDoubleAttribute.h
	Source/OpenEXR/IlmImf/ImfEnvmap.cpp
	Source/OpenEXR/IlmImf/ImfEnvmap.h
	Source/OpenEXR/IlmImf/ImfEnvmapAttribute.cpp
	Source/OpenEXR/IlmImf/ImfEnvmapAttribute.h
	Source/OpenEXR/IlmImf/ImfFloatAttribute.cpp
	Source/OpenEXR/IlmImf/ImfFloatAttribute.h
	Source/OpenEXR/IlmImf/ImfFrameBuffer.cpp
	Source/OpenEXR/IlmImf/ImfFrameBuffer.h
	Source/OpenEXR/IlmImf/ImfFramesPerSecond.cpp
	Source/OpenEXR/IlmImf/ImfFramesPerSecond.h
	Source/OpenEXR/IlmImf/ImfHeader.cpp
	Source/OpenEXR/IlmImf/ImfHeader.h
	Source/OpenEXR/IlmImf/ImfHuf.cpp
	Source/OpenEXR/IlmImf/ImfHuf.h
	Source/OpenEXR/IlmImf/ImfIO.cpp
	Source/OpenEXR/IlmImf/ImfIO.h
	Source/OpenEXR/IlmImf/ImfInputFile.cpp
	Source/OpenEXR/IlmImf/ImfInputFile.h
	Source/OpenEXR/IlmImf/ImfInt64.h
	Source/OpenEXR/IlmImf/ImfIntAttribute.cpp
	Source/OpenEXR/IlmImf/ImfIntAttribute.h
	Source/OpenEXR/IlmImf/ImfKeyCode.cpp
	Source/OpenEXR/IlmImf/ImfKeyCode.h
	Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.cpp
	Source/OpenEXR/IlmImf/ImfKeyCodeAttribute.h
	Source/OpenEXR/IlmImf/ImfLineOrder.h
	Source/OpenEXR/IlmImf/ImfLineOrderAttribute.cpp
	Source/OpenEXR/IlmImf/ImfLineOrderAttribute.h
	Source/OpenEXR/IlmImf/ImfLut.cpp
	Source/OpenEXR/IlmImf/ImfLut.h
	Source/OpenEXR/IlmImf/ImfMatrixAttribute.cpp
	Source/OpenEXR/IlmImf/ImfMatrixAttribute.h
	Source/OpenEXR/IlmImf/ImfMisc.cpp
	Source/OpenEXR/IlmImf/ImfMisc.h
    Source/OpenEXR/IlmImf/ImfMultiView.cpp
    Source/OpenEXR/IlmImf/ImfMultiView.h
	Source/OpenEXR/IlmImf/ImfName.h
	Source/OpenEXR/IlmImf/ImfOpaqueAttribute.cpp
	Source/OpenEXR/IlmImf/ImfOpaqueAttribute.h
	Source/OpenEXR/IlmImf/ImfOutputFile.cpp
	Source/OpenEXR/IlmImf/ImfOutputFile.h
	Source/OpenEXR/IlmImf/ImfPixelType.h
	Source/OpenEXR/IlmImf/ImfPizCompressor.cpp
	Source/OpenEXR/IlmImf/ImfPizCompressor.h
	Source/OpenEXR/IlmImf/ImfPreviewImage.cpp
	Source/OpenEXR/IlmImf/ImfPreviewImage.h
	Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.cpp
	Source/OpenEXR/IlmImf/ImfPreviewImageAttribute.h
	Source/OpenEXR/IlmImf/ImfPxr24Compressor.cpp
	Source/OpenEXR/IlmImf/ImfPxr24Compressor.h
	Source/OpenEXR/IlmImf/ImfRational.cpp
	Source/OpenEXR/IlmImf/ImfRational.h
	Source/OpenEXR/IlmImf/ImfRationalAttribute.cpp
	Source/OpenEXR/IlmImf/ImfRationalAttribute.h
	Source/OpenEXR/IlmImf/ImfRgba.h
	Source/OpenEXR/IlmImf/ImfRgbaFile.cpp
	Source/OpenEXR/IlmImf/ImfRgbaFile.h
	Source/OpenEXR/IlmImf/ImfRgbaYca.cpp
	Source/OpenEXR/IlmImf/ImfRgbaYca.h
	Source/OpenEXR/IlmImf/ImfRleCompressor.cpp
	Source/OpenEXR/IlmImf/ImfRleCompressor.h
	Source/OpenEXR/IlmImf/ImfScanLineInputFile.cpp
	Source/OpenEXR/IlmImf/ImfScanLineInputFile.h
	Source/OpenEXR/IlmImf/ImfStandardAttributes.cpp
	Source/OpenEXR/IlmImf/ImfStandardAttributes.h
	Source/OpenEXR/IlmImf/ImfStdIO.cpp
	Source/OpenEXR/IlmImf/ImfStdIO.h
	Source/OpenEXR/IlmImf/ImfStringAttribute.cpp
	Source/OpenEXR/IlmImf/ImfStringAttribute.h
    Source/OpenEXR/IlmImf/ImfStringVectorAttribute.cpp
    Source/OpenEXR/IlmImf/ImfStringVectorAttribute.h
	Source/OpenEXR/IlmImf/ImfTestFile.cpp
	Source/OpenEXR/IlmImf/ImfTestFile.h
	Source/OpenEXR/IlmImf/ImfThreading.cpp
	Source/OpenEXR/IlmImf/ImfThreading.h
	Source/OpenEXR/IlmImf/ImfTileDescription.h
	Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.cpp
	Source/OpenEXR/IlmImf/ImfTileDescriptionAttribute.h
	Source/OpenEXR/IlmImf/ImfTileOffsets.cpp
	Source/OpenEXR/IlmImf/ImfTileOffsets.h
	Source/OpenEXR/IlmImf/ImfTiledInputFile.cpp
	Source/OpenEXR/IlmImf/ImfTiledInputFile.h
	Source/OpenEXR/IlmImf/ImfTiledMisc.cpp
	Source/OpenEXR/IlmImf/ImfTiledMisc.h
	Source/OpenEXR/IlmImf/ImfTiledOutputFile.cpp
	Source/OpenEXR/IlmImf/ImfTiledOutputFile.h
	Source/OpenEXR/IlmImf/ImfTiledRgbaFile.cpp
	Source/OpenEXR/IlmImf/ImfTiledRgbaFile.h
	Source/OpenEXR/IlmImf/ImfTimeCode.cpp
	Source/OpenEXR/IlmImf/ImfTimeCode.h
	Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.cpp
	Source/OpenEXR/IlmImf/ImfTimeCodeAttribute.h
	Source/OpenEXR/IlmImf/ImfVecAttribute.cpp
	Source/OpenEXR/IlmImf/ImfVecAttribute.h
	Source/OpenEXR/IlmImf/ImfVersion.cpp
	Source/OpenEXR/IlmImf/ImfVersion.h
	Source/OpenEXR/IlmImf/ImfWav.cpp
	Source/OpenEXR/IlmImf/ImfWav.h
	Source/OpenEXR/IlmImf/ImfXdr.h
	Source/OpenEXR/IlmImf/ImfZipCompressor.cpp
	Source/OpenEXR/IlmImf/ImfZipCompressor.h
	Source/OpenEXR/IlmThread/IlmThread.cpp
	Source/OpenEXR/IlmThread/IlmThread.h
	Source/OpenEXR/IlmThread/IlmThreadMutex.cpp
	Source/OpenEXR/IlmThread/IlmThreadMutex.h
	Source/OpenEXR/IlmThread/IlmThreadPool.cpp
	Source/OpenEXR/IlmThread/IlmThreadPool.h
	Source/OpenEXR/IlmThread/IlmThreadSemaphore.cpp
	Source/OpenEXR/IlmThread/IlmThreadSemaphore.h
	Source/OpenEXR/Imath/ImathBox.cpp
	Source/OpenEXR/Imath/ImathBox.h
	Source/OpenEXR/Imath/ImathBoxAlgo.h
	Source/OpenEXR/Imath/ImathColor.h
	Source/OpenEXR/Imath/ImathColorAlgo.cpp
	Source/OpenEXR/Imath/ImathColorAlgo.h
	Source/OpenEXR/Imath/ImathEuler.h
	Source/OpenEXR/Imath/ImathExc.h
	Source/OpenEXR/Imath/ImathFrame.h
	Source/OpenEXR/Imath/ImathFrustum.h
	Source/OpenEXR/Imath/ImathFun.cpp
	Source/OpenEXR/Imath/ImathFun.h
	Source/OpenEXR/Imath/ImathGL.h
	Source/OpenEXR/Imath/ImathGLU.h
	Source/OpenEXR/Imath/ImathHalfLimits.h
	Source/OpenEXR/Imath/ImathInt64.h
	Source/OpenEXR/Imath/ImathInterval.h
	Source/OpenEXR/Imath/ImathLimits.h
	Source/OpenEXR/Imath/ImathLine.h
	Source/OpenEXR/Imath/ImathLineAlgo.h
	Source/OpenEXR/Imath/ImathMath.h
	Source/OpenEXR/Imath/ImathMatrix.h
	Source/OpenEXR/Imath/ImathMatrixAlgo.cpp
	Source/OpenEXR/Imath/ImathMatrixAlgo.h
	Source/OpenEXR/Imath/ImathPlane.h
	Source/OpenEXR/Imath/ImathPlatform.h
	Source/OpenEXR/Imath/ImathQuat.h
	Source/OpenEXR/Imath/ImathRandom.cpp
	Source/OpenEXR/Imath/ImathRandom.h
	Source/OpenEXR/Imath/ImathRoots.h
	Source/OpenEXR/Imath/ImathShear.cpp
	Source/OpenEXR/Imath/ImathShear.h
	Source/OpenEXR/Imath/ImathSphere.h
	Source/OpenEXR/Imath/ImathVec.cpp
	Source/OpenEXR/Imath/ImathVec.h
	Source/OpenEXR/Imath/ImathVecAlgo.h
	Source/OpenEXR/OpenEXRConfig.h
	Source/Plugin.h
	Source/Quantizers.h
	Source/ToneMapping.h
	Source/Utilities.h
	Source/ZLib/adler32.c
	Source/ZLib/compress.c
	Source/ZLib/crc32.c
	Source/ZLib/crc32.h
	Source/ZLib/deflate.c
	Source/ZLib/deflate.h
    Source/ZLib/gzclose.c
    Source/ZLib/gzguts.h
    Source/ZLib/gzlib.c
    Source/ZLib/gzread.c
    Source/ZLib/gzwrite.c
	Source/ZLib/infback.c
	Source/ZLib/inffast.c
	Source/ZLib/inffast.h
	Source/ZLib/inffixed.h
	Source/ZLib/inflate.c
	Source/ZLib/inflate.h
	Source/ZLib/inftrees.c
	Source/ZLib/inftrees.h
	Source/ZLib/trees.c
	Source/ZLib/trees.h
	Source/ZLib/uncompr.c
	Source/ZLib/zconf.h
	Source/ZLib/zlib.h
	Source/ZLib/zutil.c
	Source/ZLib/zutil.h
)

# need include directories for FreeImage and all the sub libs
include_directories(Source)
include_directories(Source/FreeImageToolkit)
include_directories(Source/LibJPEG)
include_directories(Source/LibMNG)
include_directories(Source/LibOpenJPEG)
include_directories(Source/LibPNG)
include_directories(Source/LibRawLite)
include_directories(Source/LibTIFF)
include_directories(Source/OpenEXR)
include_directories(Source/OpenEXR/Half)
include_directories(Source/OpenEXR/Iex)
include_directories(Source/OpenEXR/IlmImf)
include_directories(Source/OpenEXR/IlmThread)
include_directories(Source/OpenEXR/Imath)
include_directories(Source/ZLib)

add_definitions(-DOPJ_STATIC -DLIBRAW_NODLL -DLIBRAW_LIBRARY_BUILD -DFREEIMAGE_LIB -DNO_LCMS)
add_library(FreeImage STATIC ${FreeImage_SOURCES})
if (OGRE_PROJECT_FOLDERS)
	set_property(TARGET FreeImage PROPERTY FOLDER Dependencies)
endif ()

install_dep(FreeImage include Source/FreeImage.h)

if (APPLE)
 set_target_properties(FreeImage PROPERTIES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH "NO")

 if(OGRE_BUILD_PLATFORM_APPLE_IOS)
  set_target_properties(FreeImage PROPERTIES XCODE_ATTRIBUTE_GCC_THUMB_SUPPORT "NO")
 endif()
endif()

set(FreeImage_INCLUDE_DIR "${FreeImage_SOURCE_DIR}/Source" CACHE PATH "" FORCE)
set(FreeImage_LIBRARY_DBG FreeImage CACHE STRING "" FORCE)
set(FreeImage_LIBRARY_REL FreeImage CACHE STRING "" FORCE)
mark_as_advanced(FreeImage_INCLUDE_DIR FreeImage_LIBRARY_DBG FreeImage_LIBRARY_REL)
